﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using FlexControls;
namespace KHOALUAN
{
    public partial class frmMonHoc : Form
    {
        
        
        public frmMonHoc()
        {
            InitializeComponent();
            clsMain.cls.KhoiTaoXMLTable(clsMain.FormMonHoc, 7);
            clsMain.cls.clsForm.xmlD[clsMain.FormMonHoc].ColumnName[0] = "MÃ SỐ MÔN HỌC";
            clsMain.cls.clsForm.xmlD[clsMain.FormMonHoc].ColumnName[1] = "TÊN MÔN HỌC";
            clsMain.cls.clsForm.xmlD[clsMain.FormMonHoc].ColumnName[2] = "ĐƠN VỊ HỌC TRÌNH";
            clsMain.cls.clsForm.xmlD[clsMain.FormMonHoc].ColumnName[3] = "SỐ TIẾT";
            clsMain.cls.clsForm.xmlD[clsMain.FormMonHoc].ColumnName[4] = "LÝ THUYẾT";
            clsMain.cls.clsForm.xmlD[clsMain.FormMonHoc].ColumnName[5] = "THỰC HÀNH";
            clsMain.cls.clsForm.xmlD[clsMain.FormMonHoc].ColumnName[6] = "MÔN TIÊN QUYẾT";

            clsMain.cls.clsForm.xmlD[clsMain.FormMonHoc].Names[0] = "MSMH";
            clsMain.cls.clsForm.xmlD[clsMain.FormMonHoc].Names[1] = "TENMH";
            clsMain.cls.clsForm.xmlD[clsMain.FormMonHoc].Names[2] = "DVHT";
            clsMain.cls.clsForm.xmlD[clsMain.FormMonHoc].Names[3] = "SOTIET";
            clsMain.cls.clsForm.xmlD[clsMain.FormMonHoc].Names[4] = "LYTHUYET";
            clsMain.cls.clsForm.xmlD[clsMain.FormMonHoc].Names[5] = "THUCHANH";
            clsMain.cls.clsForm.xmlD[clsMain.FormMonHoc].Names[6] = "MONTIENQUYET";
        }

        private void frmMonHoc_Load(object sender, EventArgs e)
        {
           

            clsMain.cls.KhoiTaoFormControls(clsMain.FormMonHoc);
            clsMain.cls.KhoiTaoFormControls(clsMain.FormMonHoc, dgv);
            clsMain.cls.KhoiTaoFormControls(clsMain.FormMonHoc, but);
        }

        private void dgv_MouseDoubleClick(object sender, EventArgs e)
        {
            clsMain.cls.AddDataToControls(clsMain.FormMonHoc);
        }

        private void but_Click(object sender, EventArgs e)
        {
            clsMain.cls.ButtonsClick(clsMain.FormMonHoc, but.ClickState);
        }

        private void txtMonTienQuyet_DoubleClick(object sender, EventArgs e)
        {
            clsMain.cls.CallFormGridView(clsMain.FormGridView,clsMain.FormMonHoc,clsMain.FormMonHoc,txtMonTienQuyet.Tag.ToString());
            
        }

       

        

        
    }
}
